//
//  UIImage+UIImageZLK.h
//  ZLK
//
//  Created by it on 16/10/9.
//  Copyright © 2017年 zlgw. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, GradientType) {
    
    GradientTypeTopToBottom = 0,//从上到小
    
    GradientTypeLeftToRight = 1,//从左到右
    
    GradientTypeUpleftToLowright = 2,//左上到右下
    
    GradientTypeUprightToLowleft = 3,//右上到左下
    
};
@interface UIImage (UIImageZLK)

+ (UIImage *)imageFromColor:(UIColor *)color;

- (NSString *)Base64string;

- (UIImage *)scaleToFitSize:(CGSize)newSize;

+ (UIImage *)coreBlurImage:(UIImage *)image withBlurNumber:(CGFloat)blur;
+ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur;

+ (NSData *)imagewithCompressImage:(UIImage *)sourceImage scaledToWidth:(float)width scaledCompress:(float)compress;

//设置图片渐变
+ (UIImage *)gradientColorImageFromColors:(NSArray*)colors gradientType:(GradientType)gradientType imgSize:(CGSize)imgSize;
@end
